package com.psp.web.service;

import com.psp.web.controller.res.bean.RCartListBean;
import com.psp.web.service.exception.ServiceException;
import com.psp.web.service.impl.PageResult;

public interface ShopcartService {

	/**
	 * 获取购物车商品列表
	 * 
	 * @param page
	 * @param pageSize
	 * @param uid
	 * @return
	 */
	PageResult<RCartListBean> getCartList(int page, int pageSize, String uid);

	/**
	 * 往购物车中添加商品
	 * 
	 * @param uid
	 * @param sid
	 * @return
	 */
	boolean add(String uid, String sid) throws ServiceException;

	/**
	 * 从购物车中删除
	 * 
	 * @param uid
	 * @param sid
	 * @return
	 */
	boolean del(String uid, String sid) throws ServiceException;

	/**
	 * 同步购物车中的临时商品
	 * 
	 * @param uid
	 * @param sids
	 * @return
	 */
	boolean sync(String uid, String sids) throws ServiceException;

}
